package com.shopAttr.feign;


import com.shopAttr.bean.ShopAttr;
import com.shopAttr.feign.factory.ShopAttrFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import shopBean.common.bean.RestResult;

import java.util.List;

@FeignClient(value="service-shopAttr",fallbackFactory=ShopAttrFeignFactory.class)
public interface ShopAttrFeign {


    @RequestMapping("/shopattr/insert.api")
    public RestResult<ShopAttr> insert(@RequestBody ShopAttr shopAttr);

    @RequestMapping("/shopattr/deleteById.api")
    public RestResult deleteById(@RequestParam(value="id") String id);
    @RequestMapping("/shopattr/getByPid.api")
    public RestResult<List<ShopAttr>> getByPid(@RequestParam(value="id") String id);

    @RequestMapping("/shopattr/update.api")
    public RestResult update(@RequestBody ShopAttr shopAttr);

    @RequestMapping("/shopattr/getFristByShopId.api")
    public RestResult<List<ShopAttr>> getFristByShopId(@RequestParam(value="shopId") String shopId);

    @RequestMapping("/shopattr/getByShopId.api")
    public RestResult<List<ShopAttr>> getByShopId(@RequestParam(value="shopId")String shopId);
}
